package com.fushenlan.epidemicControl.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fushenlan.epidemicControl.dto.QueryUserReqDTo;
import com.fushenlan.po.InhabitantInfoDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author PC
 * @title: UserMapper
 * @projectName SpringBootDemo
 * @description: TODO
 * @date 2021/8/12 16:38
 */
@Mapper
public interface UserMapper extends BaseMapper<InhabitantInfoDO> {

    /**
     * 根据证件类型和证件号查询居民
     *
     * @param identifyType 证件类型
     * @param identifyNo   证件号
     * @return
     */
    InhabitantInfoDO selectByIdentity(@Param("identifyType") Integer identifyType, @Param("identifyNo") String identifyNo);

    /**
     * 查询我的所有信息
     * @param reqDTo
     * @return
     */
    List<Map<String, Object>> selectAllById(QueryUserReqDTo reqDTo);
}